/*
 * @ author Junr
 * @ use 用户相关
 */
import Request from '../request';
export default {
  // 登录
  login(params) {
    return Request.post({ url: `/login`, params });
  },
  // 发送短信
  sendMsg(params) {
    return Request.post({ url: `/sms/send/` + params.type, params });
  },
  // 获取用户信息
  getUserInfo(params) {
    return Request.post({ url: `/m/user/info`, params });
  },
  // 注册
  register(params) {
    return Request.post({ url: `/reg`, params });
  },
  // 修改密码
  updatePass(params) {
    return Request.post({ url: `/update-pass`, params });
  },
  // 账户信息
  accountInfo(params) {
    return Request.post({ url: `/m/account/info`, params });
  },
  // 收款设置
  settingsSave(params) {
    return Request.post({ url: `/m/collection/settings`, params });
  },
  // 获取收款信息设置
  getSettingsInfo(params) {
    return Request.post({ url: `/m/collection/settings/info`, params });
  },
  // 财务流水
  getNancialFlow(params) {
    return Request.post({ url: `/m/finance/water`, params });
  },
  // 邀请好礼
  getInviteIndex(params) {
    return Request.post({ url: `/m/invite/index`, params });
  },
  // 邀请好礼
  getInviteRecord(params) {
    return Request.post({ url: `/m/invite/record`, params });
  },
  // 佣金比例
  getCommissionSettings(params) {
    return Request.post({ url: `/m/team/commission/settings`, params });
  },
  // 佣金列表
  getCommissionRecord(params) {
    return Request.post({ url: `/m/commission/record`, params });
  },
  // 财务流水
  getFinanceWater(params) {
    return Request.post({ url: `/m/finance/water`, params });
  },
  // 充值：第一步
  rechargeFirst(params) {
    return Request.post({ url: `/m/finance/recharge`, params });
  },
  // 充值：第二步
  rechargeSecond(params) {
    return Request.post({ url: `/m/finance/upload`, params });
  },
  // 提现：第一步
  withdrawFirst() {
    return Request.post({ url: `/m/finance/withdraw/first` });
  },
  // 提现：第二步
  withdrawSecond(params) {
    return Request.post({ url: `/m/finance/withdraw`, params });
  },
  // BANNER图
  getBannerList(code) {
    return Request.post({ url: `/banner/list/` + code });
  },
  // 抢单
  orderGrab(params) {
    return Request.post({ url: `/m/order/grab`, params });
  },
  // 抢单列表
  getOrderGrabList(params) {
    return Request.post({ url: `/m/order/grab/list`, params });
  },
  // 已抢单列表
  getOrderMyList(params) {
    return Request.post({ url: `/m/order/my/list`, params });
  },
  // 确认收款
  getOrderConfirm(params) {
    return Request.post({ url: `/m/order/confirm`, params });
  },
  // 生成二维码
  getSendCode(params) {
    return Request.post({ url: `/common/two/bit/code`, params });
  },
  rechargeRirst(params) {
    return Request.post({ url: `/m/finance/recharge/first`, params });
  }
};
